<template>
  <div>
    <vab-json-viewer copyable :expand-depth="5" sort :value="data" />
  </div>
</template>
<script setup>
  import VabJsonViewer from 'vue-json-viewer'
  const props = defineProps({
    graphData: {
      type: Object || String,
      default: () => {},
    },
  })

  const data = ref([])

  const getData = () => {
    data.value = JSON.parse(
      JSON.stringify([
        {
          edges: props.graphData.edges,
          nodes: props.graphData.nodes,
        },
      ])
    )
  }

  getData()
</script>
